#ifndef ODBCTEST_TEST_DEFS_HPP
#define ODBCTEST_TEST_DEFS_HPP

#define ODBCTEST_CHECK_NOTHROW( EXPR) \
	try { EXPR; BOOST_CHECK( true); } \
	catch( odbc::odbc_error& e) { BOOST_CHECK_MESSAGE( false, std::string("odbc_error thrown. Details: ") + e.what()); } \
	catch( ...) { BOOST_CHECK_NO_THROW( throw); }

#define ODBCTEST_CHECK_FIELD( FIELD, DATA_TYPE, EXPECTED_VALUE) \
	BOOST_CHECK( !(FIELD).empty()); \
	BOOST_CHECK( EXPECTED_VALUE == boost::any_cast< DATA_TYPE>( FIELD));

#define ODBCTEST_CHECK_FIELD_EQUAL( FIELD, DATA_TYPE, EXPECTED_VALUE) \
	BOOST_CHECK( !(FIELD).empty()); \
	BOOST_CHECK_EQUAL( EXPECTED_VALUE, boost::any_cast< DATA_TYPE>( FIELD));


#define ODBCTEST_CHECK_NULL_FIELD( FIELD) \
	BOOST_CHECK( (FIELD).empty());


#endif // ODBCTEST_TEST_DEFS_HPP
